package ysm.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ysm.entity.Usercomploye;
import ysm.mapper.UsercomployeMapper;

@Service
public class UsercomployeService {
	@Autowired
	private UsercomployeMapper usercomployeMapper;
	
	public void insert(Usercomploye record) {
		if (usercomployeMapper.selectByPrimaryKey2(record.getUid()) == null)
			usercomployeMapper.insert(record);
		else 
			usercomployeMapper.updateByPrimaryKey(record);
	}
	
	public Usercomploye selectByPrimaryKey2(Integer uid) {
		return usercomployeMapper.selectByPrimaryKey2(uid);
	}
}
